<template>
  <div>
    <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="120px" label-identity="right" :disabled="setting.readonly" v-loading="loading">
      <el-row :gutter="5" type="flex" style="flex-wrap: wrap">
        <el-col :span="24">
          <el-form-item label-width="0">
            <groupTitle content-position="left" content="教务辅导信息"></groupTitle>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-alert class="commitment-alert" type="warning" title="重要提示" show-icon :closable="false">
            <el-form-item label-width="0" prop="commitment" style="margin-bottom:0">
              <el-checkbox v-model="dataForm.commitment">
                <strong>承诺声明：</strong> 本人已认真核对本表各项信息，承诺所填内容真实、完整，与实际情况一致，本人对填写内容的真实性负责。
              </el-checkbox>
            </el-form-item>
          </el-alert>
        </el-col>
        <el-col :span="8">
          <el-form-item label="校区品牌" prop="brand">
            <el-select v-model="dataForm.brand" placeholder="请选择签约品牌" filterable required :style="{ width: '100%' }">
              <el-option :key="item.id" :label="item.fullName" :value="item.enCode" v-for="item in brandOptions" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="辅导校区" prop="campusId">
            <el-select v-model="dataForm.campusId" placeholder="请选择" filterable clearable required :style="{ width: '100%' }" :loading="campusLoading">
              <el-option v-for="item in campusOptions" :key="item.id" :label="item.fullName" :value="item.id"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="辅导类型" prop="type">
            <el-select v-model="dataForm.type" placeholder="请选择辅导类型" filterable clearable required :style="{ width: '90%' }">
              <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.name" :value="item.value"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="开业日期">
            <el-date-picker v-model="dataForm.openDate" type="date" placeholder="暂无开业日期" value-format="timestamp" format="yyyy-MM-dd" :style="{ width: '100%' }" readonly></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="辅导师" prop="counselor">
            <user-select v-model="dataForm.counselor" placeholder="请选择" clearable required :style="{ width: '100%' }"></user-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="辅导时间" prop="pickerDate">
            <el-date-picker v-model="dataForm.pickerDate" :style="{ width: '90%' }" @change="handlePickerDateChange" type="datetimerange" value-format="timestamp" format="yyyy-MM-dd HH:mm" start-placeholder="开始时间" end-placeholder="结束时间" clearable required></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label-width="0">
            <groupTitle content-position="left" content="校区数据"></groupTitle>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="" label-width="0" size="mini" style="display: flex" class="f-flex-form-item">
            <el-form-item label="校区学位" class="f-flex-form-c-item" prop="allNum">
              <el-input-number v-model="dataForm.degree" controls-position="right" :min="0" :max="1000"></el-input-number>
            </el-form-item>
            <el-form-item label="校区床位" class="f-flex-form-c-item" prop="allNum">
              <el-input-number v-model="dataForm.bed" controls-position="right" :min="0" :max="1000"></el-input-number>
            </el-form-item>
            <el-form-item label="托管人数" class="f-flex-form-c-item" prop="allNum">
              <el-input-number v-model="dataForm.total" controls-position="right" :min="0" :max="1000"></el-input-number>
            </el-form-item>
            <el-form-item label="午托人数" class="f-flex-form-c-item" prop="noonNum">
              <el-input-number v-model="dataForm.noonNum" controls-position="right" :min="0" :max="1000"></el-input-number>
            </el-form-item>
            <el-form-item label="晚托人数" class="f-flex-form-c-item" prop="nightNum">
              <el-input-number v-model="dataForm.nightNum" controls-position="right" :min="0" :max="1000"></el-input-number>
            </el-form-item>
            <el-form-item label="全托人数" class="f-flex-form-c-item" prop="allNum">
              <el-input-number v-model="dataForm.allNum" controls-position="right" :min="0" :max="1000"></el-input-number>
            </el-form-item>
          </el-form-item>
        </el-col>
        <el-col :span="16">
          <el-form-item label="其他服务及人数" prop="otherNum">
            <el-input v-model="dataForm.otherNum" clearable :style="{ width: '400px' }" type="textarea" :autosize="{ minRows: 4, maxRows: 4 }"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="校区价格表" prop="priceDoc">
            <div class="s-div"><span class="s-tips">请上传对校区的服务价格表文件</span></div>
            <el-link type="primary">下载模版</el-link>
            <custom-upload-fz type="priceDoc" v-model="dataForm.priceDoc" :fileSize="500" sizeUnit="MB" :limit="9" buttonText="点击上传文件" :style="{ width: '300px' }"></custom-upload-fz>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label-width="0">
            <groupTitle content-position="left" content="教务辅导"></groupTitle>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="校区环创" prop="place" class="f-s-item">
            <div class="s-div">
              <span class="s-tips">校区环创亮点&不足的图片（上传图片1-9张）</span>
            </div>

            <el-form-item class="f-s-c-item">
              <div class="f-s-c-div">
                <custom-upload-img type="place" v-model="dataForm.place" :fileSize="500" sizeUnit="MB" :limit="9"></custom-upload-img>
              </div>
            </el-form-item>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="校区流程" prop="flow" class="f-s-item">
            <div class="s-div">
              <span class="s-tips">校区流程亮点&不足的图片（上传图片1-9张）</span>
            </div>
            <el-form-item class="f-s-c-item">
              <div class="f-s-c-div">
                <custom-upload-img type="flow" v-model="dataForm.flow" :fileSize="500" sizeUnit="MB" :limit="9"></custom-upload-img>
              </div>
            </el-form-item>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="班级管理" prop="classes" class="f-s-item">
            <div class="s-div">
              <span class="s-tips">校区班级管理亮点&不足的图片（上传图片1-9张）</span>
            </div>
            <el-form-item class="f-s-c-item">
              <div class="f-s-c-div">
                <custom-upload-img type="classes" v-model="dataForm.classes" :fileSize="500" sizeUnit="MB" :limit="9"></custom-upload-img>
              </div>
            </el-form-item>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="校区亮点" prop="sparkle" class="f-s-item">
            <el-form-item class="f-s-c-item">
              <div class="f-s-c-div">
                <el-input v-model="dataForm.sparkle" type="textarea" :rows="2" placeholder="请输入校区亮点"></el-input>
              </div>
            </el-form-item>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="校区不足" prop="deficiency" class="f-s-item">
            <el-form-item class="f-s-c-item">
              <div class="f-s-c-div">
                <el-input v-model="dataForm.deficiency" type="textarea" :rows="2" placeholder="请输入校区不足"></el-input>
              </div>
            </el-form-item>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="教务/督导检查表" prop="reviewDoc">
            <div class="s-div"><span class="s-tips">请上传校区运营规范检查表</span></div>
            <el-link type="primary">下载模版</el-link>
            <custom-upload-fz type="reviewDoc" v-model="dataForm.reviewDoc" :fileSize="500" sizeUnit="MB" :limit="9" buttonText="点击上传文件" :style="{ width: '300px' }"></custom-upload-fz>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="改进方案" prop="improve">
            <div class="s-div"><span class="s-tips">请上传与校区达成一致的具体改进方案</span></div>
            <el-link type="primary">下载模版</el-link>
            <custom-upload-fz type="improve" v-model="dataForm.improve" :fileSize="500" sizeUnit="MB" :limit="9" buttonText="点击上传文件" :style="{ width: '300px' }"></custom-upload-fz>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label-width="0">
            <groupTitle content-position="left" content="综合评价"></groupTitle>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item style="display:flex;" prop="regularity" label-width="60px">
            <template slot="label">
              <el-tag effect="dark">校区规范性</el-tag>
            </template>
            <span>流程标准</span>
            <el-rate v-model="regularity1" :colors="colors" @change="setCurrentValue"></el-rate>
            <span style="margin-left:20px">环创布置</span>
            <el-rate v-model="regularity2" :colors="colors" @change="setCurrentValue"></el-rate>
            <span style="margin-left:20px">安全规范</span>
            <el-rate v-model="regularity3" :colors="colors" @change="setCurrentValue"></el-rate>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item style="display:flex;" prop="team" label-width="60px">
            <template slot="label">
              <el-tag effect="dark">团队执行力</el-tag>
            </template>
            <span>团队精神面貌</span>
            <el-rate v-model="team1" :colors="colors" @change="setCurrentValue"></el-rate>
            <span style="margin-left:20px">老师带班能力</span>
            <el-rate v-model="team2" :colors="colors" @change="setCurrentValue"></el-rate>
            <span style="margin-left:20px">班级管理规范</span>
            <el-rate v-model="team3" :colors="colors" @change="setCurrentValue"></el-rate>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item style="display:flex;" prop="profit" label-width="60px">
            <template slot="label">
              <el-tag effect="dark">招生营销性</el-tag>
            </template>
            <span>招生满员有口碑</span>
            <el-rate v-model="profit1" :colors="colors" @change="setCurrentValue"></el-rate>
            <span style="margin-left:20px">服务项目多元化</span>
            <el-rate v-model="profit2" :colors="colors" @change="setCurrentValue"></el-rate>
            <span style="margin-left:20px">团队市场意识强</span>
            <el-rate v-model="profit3" :colors="colors" @change="setCurrentValue"></el-rate>
          </el-form-item>
        </el-col>

        <el-col :span="24">
          <el-form-item label="综合评分" prop="score">
            <span>{{ dataForm.score == 0 ? 10 : dataForm.score }}</span>
          </el-form-item>
        </el-col>
        
      </el-row>
    </el-form>
  </div>
</template>
<script>
export { default } from './index.js'
</script>
<style scoped>
.commitment-alert {
  margin-bottom: 10px;
}
.commitment-alert :deep(.el-alert__title) {
  font-weight: 700;
}
.commitment-alert :deep(.el-alert__content) {
  line-height: 1.6;
}
.el-time-spinner__wrapper {
  width: 100% !important;
}
@import url(index.scss);
</style>
